home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000824-20010305
/
000166_news@columbia.edu _Fri Dec 29 16:42:36 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-03-05
|
2KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id QAA27520
for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 29 Dec 2000 16:42:36 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA23647
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 29 Dec 2000 16:42:35 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id QAA17519
for kermit.misc@watsun.cc.columbia.edu; Fri, 29 Dec 2000 16:42:13 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
Subject: Re: Converting struct tm to time_t
Date: 29 Dec 2000 21:22:10 +0000
Organization: disorganised
Message-ID: <87snn6q5x9.fsf@erlenstar.demon.co.uk>
To: kermit.misc@columbia.edu
>>>>> "Derek" == Derek M Flynn <dmf@cs.uchicago.edu> writes:
> Andrew Gierth wrote:
>> at least some systems have a timegm() function which is the UTC
>> equivalent of mktime(). For those that don't, the straightforward
>> calculation method is probably sufficient, though an alternative
>> might be to do putenv("TZ=GMT0"); and then use mktime()....
Derek> Don't forget to call tzset() after putenv and before mktime
SUS sez this is not needed, but I think I recall some older systems
where it was necessary.
--
Andrew.
comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
or <URL: http://www.whitefang.com/unix/>